import * as PIXI from 'pixi.js'
import useMainStore from '@renderer/store/modules/useMainStore'

export default async function (): Promise<
  {
    textureSource: PIXI.TextureSource
  } & Wx.Mawby.WinParams
> {
  const mainStore = useMainStore()
  await mainStore.getApp()
  const bundle = await PIXI.Assets.loadBundle('cardBook')
  const textureSource = new PIXI.Texture(bundle.cardBook).source // 创建纹理
  return {
    ...mainStore.getAppAttr,
    textureSource,
  }
}
